@Service(ExampleService.class)
public class ExampleServiceBean implements ExampleService {
@Override
public String sayHello(String name) {
// TODO Auto-generated method stub
return null;
}
}
The bean component provides support for implementing services using Java classes.
This wizard creates a new component implemented by a Java class In addition to creating the class, the wizard ensures the Bean capability is enabled for the project. The resulting class is annotated with @Service so the specified service will be registered with the SwitchYard runtime when the application is deployed. An example of the resulting class is shown below:
@Service(ExampleService.class)
public class ExampleServiceBean implements ExampleService {
@Override
public String sayHello(String name) {
// TODO Auto-generated method stub
return null;
}
}